-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Relay example with TypeScript using Next.js compiler #37450
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I see we already have a relay example here: https://github.com/vercel/next.js/tree/canary/examples/with-relay-modern should we upgrade that one instead? We can also rename to with-relay
, just make sure to leave a README in the old location to point to the new one. 👍
@balazsorban44 Thanks for the feedback. I'd like to update that old {
viewer {
allBlogPosts(first: 10, orderBy: {createdAt: desc}) {
edges {
node {
id
title
}
}
}
}
} Running that returns an error message: {
"errors": [
{
"message": "Error occurred during query execution:\nConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: Db, cause: Some(DbError { severity: \"ERROR\", parsed_severity: Some(Error), code: SqlState(\"42P01\"), message: \"relation \\\"public.BlogPost\\\" does not exist\", detail: None, hint: None, position: Some(Original(164)), where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some(\"parse_relation.c\"), line: Some(1173), routine: Some(\"parserOpenTable\") }) }) })",
"locations": [
{
"line": 4,
"column": 7
}
],
"path": [
"viewer",
"allBlogPosts",
"edges"
]
}
],
"data": {
"viewer": {
"allBlogPosts": {
"edges": null
}
}
}
} Since that example doesn't deploy to Vercel either, I'm not sure it provides a whole lot of value in its current state. The new example I've added here as a replacement uses the GitHub GraphQL API which seems like a more reliable option and less likely to break. I'll add a reference to the README of |
I realized there is already PR for this: #33892 |
df8579c
to
47e5ebe
Compare
e078ebe
to
6b863fe
Compare
Bug
fixes #number
contributing.md
Feature
fixes #number
contributing.md
Documentation / Examples
pnpm lint